home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / m2menu.zip / MENUIO.DEF < prev    next >
Text File  |  1990-03-22  |  1KB  |  38 lines

  1. DEFINITION MODULE MenuIO; (* JPI TopSpeed Modula-2 V1.16 *)
  2.  
  3.  PROCEDURE Delay(n:CARDINAL);
  4.  
  5.  (* Delay pauses program a CARDINAL value of millisecs: 1000 = 1 sec. *)
  6.  
  7.  
  8.  PROCEDURE EnvFind(name:ARRAY OF CHAR; VAR result:ARRAY OF CHAR);
  9.  
  10.  (* EnvFind finds a string in the DOS environment *)
  11.  
  12.  
  13.  PROCEDURE Exec (command:ARRAY OF CHAR; params:ARRAY OF CHAR);
  14.  
  15.  (* Exec executes a named program, using all free heap memory to do so. *)
  16.  (* All memory allocation/deallocation is automatic. Include ext & Path *)
  17.  (* eg Exec('\COM\ED.EXE','AFILE'); will be passed as the 'command line'*)
  18.  
  19.  
  20.  PROCEDURE ExecCmd(command:ARRAY OF CHAR);
  21.  
  22.  (* ExecCmd is similar to Exec except the command is executed under *)
  23.  (* COMMAND.COM, the DOS command interpreter. This means that the   *)
  24.  (* command can be exactly as typed from the normal DOS prompt, and *)
  25.  (* may include 'built in' commands such as DIR, COPY etc.          *)
  26.  (* Examples: ExecCmd('dir /w');   ( do a 'wide' DOS directory )    *)
  27.  (*           ExecCmd('ed afile'); ( same as Exec example above )   *)
  28.  (* ExecCmd is generally preferred over Exec for general use        *)
  29.  (* although it has two disadvantages:                              *)
  30.  (* 1) There is slightly less memory available to run the command,  *)
  31.  (* 2) COMMAND.COM must be re-loaded which is slightly slower.      *)
  32.  
  33.  
  34.  PROCEDURE GetKey(VAR sc:CHAR): CHAR;
  35.  
  36.  (* GetKey returns Char and scan code *)
  37.  
  38.  END MenuIO.